List of promo code orders
This request is used to get a list of promo code orders.
Request syntax
GET https://b2b-api.go.yandex.ru/integration/2.0/promocodes/orders/list?
limit=<number of records>
&cursor=<tag from the previous request>
Request headers
Authorization: Bearer <OAuth-token>
OAuth access token. The steps to get a token are described in Getting started.
X-YaTaxi-Selected-Corp-Client-Id— client ID from the account. Required if multiple clients are available using the token.
Request parameters
The request must contain the following parameter:
limit: The number of records to output.
The request can contain the optional parameter:
cursor: The request tag (returned in the body of the response to the previous request). You don't need to specify this parameter for the request of the first page, but you need to do it for all subsequent pages.
Response field description
The response contains the following fields:
|
Field |
Description |
Format |
|
|
List of orders. |
Array of objects |
|
|
Request tag. |
String |
Structure of the orders array element:
|
Field |
Description |
Format |
|
|
Promo code expiration date. |
String |
|
|
Number of promo codes in a series. |
Number |
|
|
The order ID. |
String |
|
|
Detailed pricing information. |
Object |
|
|
A service where you can apply promo codes. |
String |
|
|
The order status. |
String |
|
|
Value of a single promo code. |
Number |
|
|
Number of revoked promo codes in the order. |
Number |
|
|
A list of service classes covered by the Taxi promo code. |
Array |
|
|
List of fuel types eligible for the promo code. Specified only for the |
Array |
Structure of the pricing array element:
|
Field |
Description |
Format |
|
|
Cost. |
Number |
|
|
Cost with VAT. |
Number |
|
|
Currency. |
String |
|
|
VAT value. |
Number |
Request example
POST https://b2b-api.go.yandex.ru/integration/2.0/promocodes/orders/list?limit=4
...
Authorization: Bearer <OAuth-token>
X-YaTaxi-Selected-Corp-Client-Id: <client-id>
Response example
{
"next_cursor": "60e...602",
"orders": [
{
"active_until": "2024-12-01",
"classes": [
"cargo"
],
"count": 31,
"order_id": "15b..7746",
"pricing": {
"cost": "6820.00",
"cost_with_vat": "8184.00",
"currency": "RUB",
"vat": "0.20"
},
"service": "taxi",
"status": "creation_success",
"value": 220,
"revoke_count": 0
},
{
"active_until": "2024-10-31",
"count": 12,
"order_id": "895...48b",
"pricing": {
"cost": "1476.00",
"cost_with_vat": "1771.20",
"currency": "RUB",
"vat": "0.20"
},
"service": "taxi",
"status": "creation_success",
"value": 123,
"revoke_count": 1
}
]
}
Response codes
The response to this request can contain the following standard HTTP codes:
200: Request completed successfully.400: An unknown parameter or a parameter with an invalid value was passed in the request.403:- SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header
X-YaTaxi-Selected-Corp-Client-Id(returned if more than one client is available for the token). - SELECTED_CLIENT_ACCESS_DENIED: the header
X-YaTaxi-Selected-Corp-Client-Idcontains the client's ID, which this login does not have access to.
- SELECT_CLIENT_HEADER_REQUIRED: the request did not pass the header